<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!--[if lt IE 9]>
　　　　<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
　　<![endif]-->
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/sytle.css?v=0.2&d=2016-11-08">
<title>修改密码</title>
</head>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/lib/jquery/1.9.1/jquery.min.js?v=0.1"></script>
<title>修改密码</title>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						var isView = false;
						$("#btn_sub")
								.click(
										function() {
											var is = true;

											/*var oldPassword="${ERROR_INFO}";
											if(document.ERROR_INFO.value != oldPassword) {
											    alert('请重新输入当前密码');
											 	is = false; 
											}*/
											var password = $("#password").val();
											if (password == ''
													|| password.length < 6) {

												$("#tip").show();
												$("#tipMsg").text(
														"新密码长度不足,请重新输入");
												is = false;
												close();
											}
											var repassword = $("#rePassword")
													.val();
											if (repassword == ''
													|| repassword.length < 6) {

												$("#tip").show();
												$("#tipMsg").text("请再次输入新密码");
												is = false;
												close();
											}
											if (repassword != password) {

												$("#tip").show();
												$("#tipMsg").text("两次密码输入不一致");
												is = false;
												close();
											}

											if (is) {
												$("#mdPwdForm").submit();
											}
										});

					});
	function close() {
		setTimeout(function() {
			$("#tip").hide();
		}, 2000);
	}
</script>
<body>
	<div class="hgj">
		<div class="page-all">
			<!--头部开始-->
			<header>
				<div class="navbar">
					<ul>
						<li class="l-back"><a href="javascript:history.go(-1)"><img
								src="${pageContext.request.contextPath}/images/left.png"
								alt="返回" /> </a></li>
						<li class="n-word">修改密码</li>
						<li class="n-intro"></li>
					</ul>
				</div>
			</header>
			<!---内容开始--->
			<div class="container">
				<form
					action="${pageContext.request.contextPath}/members/accountPassword.html"
					method="post" id="mdPwdForm">
					<div class="former">
						<ul>
							<li><input type="password" placeholder="请输入旧密码"
								id="oldPassword" name="oldPassword" class="user-tel"></li>
							<li><input type="password" placeholder="请输入新密码"
								id="password" name="wMPassword" class="user-tel"></li>
							<li><input type="password" placeholder="确认密码"
								id="rePassword" placeholder="再次输入新密码" class="user-tel">
							</li>
						</ul>
						<div class="login-btn">
							<a herf="javascript:void(0);" id="btn_sub">确认修改 </a>
						</div>
					</div>
				</form>
					<div align="center"><h2>${ERROR_INFO}</h2></div>
			</div>
		
			<div class="login-layer" style="display: none;" id="tip">
				<span id="tipMsg"></span>
			</div>
		</div>
	</div>
</body>
</html>
